home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 26.zip
/
BS1 part 26
/
The Director Toolkit v1.0.adf
/
Programs
/
Text
/
docs
< prev
Wrap
Text File
|
1987-02-25
|
7KB
|
179 lines
|r1
|c7|f1|t1Text Reader|c3|f0|t0|r1
The text reader is the program that you have been using to read
the documentation files on this disk. The script for the text
reader is provided so that you may adapt it to your own requirements.|r1
When you run the text reader, it looks for a file called |c7"docs"|c3 in
the same directory that the text reader is in, and proceeds to display
the text contained in that file.|r1
The text reader will automatically word-wrap as it displays
the text, and recognizes some imbedded signal characters
so that you can change fonts, auto-center, and change text
color and style.
|e
When you build a |c7"docs"|c3 file for the text reader, you do not have to
worry about deciding where to break the lines of text into individual
lines, as the word wrap capability of the text reader will decide
that for you. You can enter text in most any haphazard way, and
the text reader will straighten it out when it displays on the
screen. If you want to break a line for a new paragraph, a single
blank line will cause a break to a new line. Two blank lines will
cause a blank line between paragraphs, or you can use the "r" command
to insert a new line.|r1
The character |c7'|-||'|c3 is reserved for signalling, and will be
followed by another character or characters specifying what function is
to be performed.
|e
|r2
The provided functions are:|r1
|c7|+4 ||e|+4end of page|r1
|+4 ||f#|+3select font number #|r1
|+4 ||c#|+3change to text color #|r1
|+4 ||s#|+3select style #|r1
|+4 ||t#|+3centering on/off|r1
|+4 ||-|+4backspace|r1
|+4 ||+#|+3required spacing|r1
|+4 ||r#|+3insert new lines|r1
|+4 |||||+5output a |||c3|r1
|e
One of the best ways to see how you would build text for the text
reader is to examine some of the |c7"docs"|c3 files directly in any of the
directories on this disk which contain the |c7README|c3 icon. All the
|c7README|c3 icons represent copies of the text reader's |c7.film|c3 file,
renamed to the appropriate name for the text being read. Otherwise, they
are all identical.|r1
The background screen for the text reader is found on the toolkit disk
in the directory |c7ToolKit:pictures|c3 and is called |c7"framer"|c3|-.
You can
modify this to suit, though it should probably be a medium-res (640x200)
image. By changing the palette or border pattern of this image, you will
modify all of the text screens found on this disk.
|e
Here are the specifics on each of the commands:|r1
|c7||e End Of Page|c3|r1
You should use this command to signal here is where you want a break
to the next screen. While it is not required that you use this to
signify page breaks, you will get much better results if all the
page breaks are specified by this command.|r1
A good way to determine where you need to place the page breaks is to
first type in your text information, then display it with the text reader
with no page signals. The text reader will automatically break pages
when the text gets to the end of the screen. You can then decide exactly
where you would like the page break to occur, and go back into the
|c7"docs"|c3
file and add the |c7||e|c3 command accordingly.|r1
|e
|r3
|c7||f# Select Font|c3|r1
This command will allow you to specify a change in fonts. Currently,
only two fonts are implemented in the text reader, |c7Topaz 8|c3
and |c7Topaz 9|c3|-.
You can add fonts to the reader by adding |c7LOADFONT|c3|-s of them to
the text
reader script and regenerating the text reader's |c7.film|c3 file.
Follow
the examples in the script of the Topaz fonts for how to do this.|r1
|e
|r3
Font #1 is |c7Topaz 8|c3|-, and Font #2 |c7Topaz 9|c3|-. Font changing
commands will appear something like this in a |c7"docs"|c3 file:|r1
|c7|+8because we have ||f2discovered|-||f1 that|c3|r1
which will cause the word "discovered" to be in |c7Topaz 9|c3 with the rest
of the text in |c7Topaz 8|c3like this:|r1
|c7|+8because we have |f2discovered|f1 that|c3|r1
|e
|c7||c# Set Color|c3|r1
You can select a different palette color for text by
using the |c7|+1||c#|c3 command. You can change to any of the
colors in the palette of the
|c7ToolKit:pictures/framer|c3 background file. Since this
file is currently an |c78|c3 color
image, you can specify color numbers |c70-7|c3 to pick any one of
the |c78|c3 colors
available. You can change the color selection by using a (preferably
non-HAM) paint program to adjust the palette of the picture, and you can
even convert it to a |c716|c3 color image allowing you to use color numbers
|c70-9|c3|-. Currently colors |c710|c3 and over are not allowable as
the color command
only allows one digit for color selection. This can be modified in the
text reader script by the zealous.|r1
|e
|r2
The default text color is |c73|c3|-. Here is our example with a color
change instead of a font change:|r1
|c7|+8because we have ||c1discovered|-||c3 that|c3|r1
Or, with both a color and font change:|r1
|c7|+8because we have ||f2|-||c4discovered|-||f1|-||c1 that|c3|r1
|e
|r2
|c7||s# Changing Text Style|c3|r1
You can change text style to underline, italic or Bold with the
|c7||s|c3 command:
|r1
|c7|+80 - Normal|r1
|+81 - Underline|r1
|+82 - Bold|r1
|+83 - Italic|c3|r1
|e
So, to convert our above example to bolded text, here is what you
would enter into the |c7"docs"|c3 file:|r1
|c7|+8because we have ||s2discovered|-||s0 that|c3|r1
|c7||t# Centering On/Off|c3|r1
You can turn centering off and on with |c7||t1|c3 to turn it on, and
|c7||t0|c3 to turn it off.|r1
|c7||- Backspace|c3|r1
Sometimes it is useful to override spaces that follow words that are
automatically output by the word-wrap portion of the text reader.
If you find places in your document file where you are finding the
output has a space where you don't want it, you can follow that
portion of your text with the |c7||-|c3 signal, which will cause a
backspace to occur.|r1
|e
|c7||+# Required Spacing|c3|r1
Sometimes you want some spaces which may otherwise be automatically
removed by the word-wrap function of the text reader. By inserting
|c7||+4|c3 for example, you can add |c74|c3 spaces that will not be
removed by
word wrapping. You are allowed up to |c710|c3 spaces, |c71-9|c3
and |c70|c3 (for 10).
If you need more, you can combine more than one required space command
in a row, such as: |c7||+0|-||+4|c3 for |c714|c3 spaces.|r1
|c7||r# Insert New Lines|c3|r1
You may wish to interrupt the normal word-wrap so that you can start
a new sentence on the next line, or even leave a space between
paragraphs. You can do this by placing a |c7||r1|c3 at the end of the text
after which you wish a new line to start. By using |c7||r2|c3, you can
then leave a blank line between paragraphs. An extra blank line in
your |c7"docs"|c3 file will have a similar effect to
the |c7||r1|c3 command.|r1
|e
|r3
|c7|||||+3Output a |||c3|r1
You may need to output the vertical bar symbol at times, and since this
character is otherwise reserved for the signal character for the special
text functions, you will need to enter it twice to output the character
directly, so that it is not interpreted as a command.